<template>
  <div class="app-container">
    <el-row :gutter="20">
      <el-col :span="12">
        <el-card class="box-card">
          <template #header>
            <div class="card-header">
              <span>轮播图管理</span>
              <el-button type="primary" @click="handleCarousel">管理轮播图</el-button>
            </div>
          </template>
          <div class="card-content">
            <p>管理首页轮播图展示，支持图片上传、排序、显示状态控制等功能。</p>
            <el-tag type="success">当前轮播图数量: {{ carouselCount }}</el-tag>
          </div>
        </el-card>
      </el-col>
      <el-col :span="12">
        <el-card class="box-card">
          <template #header>
            <div class="card-header">
              <span>用户标签管理</span>
              <el-button type="primary" @click="handleUserTags">管理用户标签</el-button>
            </div>
          </template>
          <div class="card-content">
            <p>管理用户标签分类，支持标签的增删改查、排序等功能。</p>
            <el-tag type="info">当前标签数量: {{ tagCount }}</el-tag>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const carouselCount = ref(0)
const tagCount = ref(0)

onMounted(() => {
  // 这里可以加载统计数据
  loadStatistics()
})

const loadStatistics = () => {
  // 模拟数据，实际应该从API获取
  carouselCount.value = 5
  tagCount.value = 12
}

const handleCarousel = () => {
  router.push('/homepage/carousel')
}

const handleUserTags = () => {
  router.push('/homepage/user-tags')
}
</script>

<style scoped>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-content {
  padding: 10px 0;
}

.card-content p {
  margin-bottom: 15px;
  color: #666;
}
</style> 